//
//  JGAdViewController.m
//  Netease_Project
//
//  Created by JJetGu on 15-6-18.
//  Copyright (c) 2015年 JJetGu. All rights reserved.
//

#import "JGAdViewController.h"
#import "JGMainViewController.h"

@interface JGAdViewController ()

@end

@implementation JGAdViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 1.背景图片
    UIImageView *bg = [[UIImageView alloc] init];
    bg.image = [UIImage imageNamed:@"LaunchImage"];
    bg.frame = self.view.bounds;
    [self.view addSubview:bg];
    
    // 2.广告图片(真实的广告图片应该要先下载广告图片)
    UIImageView *ad = [[UIImageView alloc] init];
    ad.image = [UIImage imageNamed:@"LaunchAd.jpg"];
    ad.width = 280;
    ad.height = 300;
    ad.centerX = self.view.width * 0.5;
    ad.y = 60;
    [self.view addSubview:ad];
    
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         UIWindow *window = [UIApplication sharedApplication].keyWindow;
         UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
         window.rootViewController = [storyboard instantiateViewControllerWithIdentifier:@"Main"];
     });
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
